package com.top10.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import org.hibernate.validator.constraints.NotEmpty;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author ellen
 * @since 2018-10-07
 */
@TableName("tb_user_cart")
public class UserCart extends Model<UserCart> {

    private static final long serialVersionUID = 1L;

    @NotEmpty(message = "商品skukey不能为空")
    private String skukey;
    /**
     * 序号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 唯一标识码
     */
    private String uuid;
    /**
     * 用户uuid
     */
    @TableField("user_uuid")
    private String userUuid;
    /**
     * 商品uuid
     */
    @NotEmpty(message = "商品uuid不能为空")
    @TableField("goods_uuid")
    private String goodsUuid;
    /**
     * 数量
     */
//	@NotEmpty(message = "商品数量不能为空")
    private Integer quantity;
    /**
     * 属性
     */
    @NotEmpty(message = "商品属性不能为空")
    private String attribute;
    /**
     * 是否删除
     */
    private Boolean isdeleted;
    /**
     * 创建时间
     */
    private Date createtime;
    /**
     * 更新时间
     */
    private Date updatetime;
    /**
     * 创建者
     */
    private String creator;
    /**
     * 更新者
     */
    private String mender;
    /**
     * 咨询商家或者代理商的uuid
     */
    @NotEmpty(message = "店铺uuid不能为空")
    @TableField("s_uuid")
    private String sUuid;
    /**
     * 咨询商家或代理商的地址
     */
    @TableField("s_addr")
    private String sAddr;


    public String getSkukey() {
        return skukey;
    }

    public void setSkukey(String skukey) {
        this.skukey = skukey;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getUserUuid() {
        return userUuid;
    }

    public void setUserUuid(String userUuid) {
        this.userUuid = userUuid;
    }

    public String getGoodsUuid() {
        return goodsUuid;
    }

    public void setGoodsUuid(String goodsUuid) {
        this.goodsUuid = goodsUuid;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public String getAttribute() {
        return attribute;
    }

    public void setAttribute(String attribute) {
        this.attribute = attribute;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getMender() {
        return mender;
    }

    public void setMender(String mender) {
        this.mender = mender;
    }

    public String getsUuid() {
        return sUuid;
    }

    public void setsUuid(String sUuid) {
        this.sUuid = sUuid;
    }

    public String getsAddr() {
        return sAddr;
    }

    public void setsAddr(String sAddr) {
        this.sAddr = sAddr;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "UserCart{" +
                ", skukey=" + skukey +
                ", id=" + id +
                ", uuid=" + uuid +
                ", userUuid=" + userUuid +
                ", goodsUuid=" + goodsUuid +
                ", quantity=" + quantity +
                ", attribute=" + attribute +
                ", isdeleted=" + isdeleted +
                ", createtime=" + createtime +
                ", updatetime=" + updatetime +
                ", creator=" + creator +
                ", mender=" + mender +
                ", sUuid=" + sUuid +
                ", sAddr=" + sAddr +
                "}";
    }
}
